<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <input type="text" id="txt">
    <button id="btn">验证</button>
    <script>

        var reg = /^(\+08|0086)?\s*1[3-9]\d{9}$/;
        btn.onclick = function () {
            var value = txt.value;
            if (reg.test(value)) {
                alert("输入正确")
            } else {
                alert("错误")
            }
        }
    </script>
</body>

</html>